

$hostname = hostname
$sqlPath = (resolve-path .\sql)

$script = "DROP LOGIN [$hostname\Provisioning] 
GO
CREATE LOGIN [$hostname\Provisioning] 
FROM WINDOWS 
WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]
GO
EXEC master..sp_addsrvrolemember @loginame = N'$hostname\Provisioning', @rolename = N'sysadmin'
GO"

set-content $sqlPath\CreateProvisioningLogin.sql $script